package com.tech.ioc;


import org.junit.Test;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;

/**
 * @Description: BeanFactory容器的应用
 * @Author: zl
 * @Date: 2019/5/22 17:49
 */
public class SpringBeanFactoryExam {

    @Test
    public void xmlBeanFactoryTest() {
        XmlBeanFactory xmlBeanFactory = new XmlBeanFactory(new ClassPathResource("beanFactoryExam.xml"));
        HelloWorldBean obj = (HelloWorldBean) xmlBeanFactory.getBean("helloWorld");
        obj.getMessage();
    }

    public static void main(String[] args) {

    }
}
